"""Add user_id to scheduled_task

Revision ID: 123456789abc
Revises: 6ef52bebccdb
Create Date: 2025-07-12 12:00:00.000000

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '123456789abc'
down_revision = '6ef52bebccdb'
branch_labels = None
depends_on = None


def upgrade():
    with op.batch_alter_table('scheduled_task', schema=None) as batch_op:
        batch_op.add_column(sa.Column('user_id', sa.Integer(), sa.ForeignKey('user.id'), nullable=True))


def downgrade():
    with op.batch_alter_table('scheduled_task', schema=None) as batch_op:
        batch_op.drop_column('user_id')